<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>客户关系管理系统</title>
    <link rel="stylesheet" href="/static/css/style2.css">
    <script type="text/javascript" src="/static/plugins/easyui/jquery.min.js"></script>
    <script>

        $(function () {
            $("#btn_submit").click(function () {
                /*参数使用序列化的方式提交*/
                $.post("/login.do",$("form").serialize(),function (data) {
                    if (data.success) {
                        parent.location.href="/index.do";
                    }else{
                        alert(data.msg);
                    }
                },'json')
            })
        })
    </script>
</head>

<body >
<div class="login-form">
    <div align="center">
        <span><img src="static/images/22.png"/></span>
        <span><img src="static/images/2.jpg"/></span>
        <span><img src="static/images/22.png"/></span>
    </div>
    <h1></h1>
    <div class="login-top">
        <form>
            <div class="login-ic">
                <i ></i>
                <p><input type="text" name="username" value="admin" placeholder="账号"></p>
                <div class="clear"> </div>
            </div>
            <div class="login-ic">
                <i class="icon"></i>
                <p><input type="password" name="password" value="123" placeholder="密码"></p>
                <div class="clear"> </div>
            </div>

            <div class="log-bwn">
                <input id="btn_submit" type="button"  value="Login" onclick="login()">
            </div>

        </form>
    </div>
</div>
</body>
</html>